package com;

import com.config.ConfigUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * Copyright (c)  by www.leya920.com
 * All right reserved.
 * Create Date: 2021-01-03 10:04
 * Create Author: xuweiwei
 * File Name: Application.java
 * Last version:  1.0
 * Function: //TODO
 * Last Update Date: 2021-01-03 10:04
 * Last Update Log:
 * Comment: //TODO
 **/
@SpringBootApplication
public class Application {


	public static void main(String[] args) {
//		SpringApplication.run(Application.class,args);
		ConfigurableApplicationContext context = SpringApplication.run(Application.class,args);

		ConfigUtil configUtil = context.getBean("configUtil", ConfigUtil.class);

		System.out.println(configUtil.getUsername());
//		new RuntimeException().printStackTrace();
	}
}
